<template>
	<view>
		<text>数据绑定学习</text>
		<view>{{mes}}</view>
		<view>{{'你好'+'世界'}}</view>
		<view>{{1+1}}</view>
		<view>{{flag?'我是假的，这是反话':'这是反话，我是真的'}}</view>
		<!-- <image v-bind:src="imgUrl"></image> -->
		<image :src="imgUrl"></image>
		<!-- in 前后一定有一个空格 -->
		<view v-for="(item,index) in arr" :key="item.id">
			名字：{{item.name}},年龄：{{item.age}}
		</view>
		<!-- <button type="primary" v-on:click="clickHandle(20,$event)">按钮</button> -->
		<button type="primary" @:click="clickHandle(20,$event)">按钮</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				mes: 'hello',
				flag: false,
				imgUrl: 'https://api-hmugo-web.itheima.net/pyg/banner1.png',
				arr: [{
						name: '宋小宝',
						age: 20,
						id: 1,
					},
					{
						name: '刘能',
						age: 21,
						id: 2,
					},
					{
						name: '赵四',
						age: 30,
						id: 3,
					},
					{
						name: '小沈阳',
						age: 22,
						id: 4,
					}
				]
			}
		},
		methods: {
			clickHandle(num, e) {
				console.log('点击我了:', num, e)
			}
		}
	}
</script>

<style>
</style>
